Skip to content

Give box-gun primaries weight 1 in o2-sim - #15808

Merged
sawenzel merged 1 commit into
AliceO2Group:devfrom
sawenzel:boxgen-weight
Sep 17, 2026
Merged

sawenzel merged 1 commit into
AliceO2Group:devfrom
sawenzel:boxgen-weight

Conversation

@sawenzel

Copy link
Copy Markdown
Collaborator

This fixes zero track weights for the box-gun generator presets in o2-sim.

  • FairBoxGenerator adds tracks without a weight, so FairRoot's default of 0 was used.
  • Geant4 scoring multiplies by the track weight, so all scores were zero.
  • The box-gun presets and toftest now use o2::eventgen::BoxGenerator, which gives weight 1.
  • BoxGenerator now looks up the mass for each call; the static cache gave every generator the mass of the first one used.
  • The kinematics distributions are unchanged; for a fixed seed the particle list is shifted by one particle.
  • BoxGunParam.debug no longer has an effect.

This fixes zero track weights for the box-gun generator presets in o2-sim.

- FairBoxGenerator adds tracks without a weight, so FairRoot's default of 0 was used.
- Geant4 scoring multiplies by the track weight, so all scores were zero.
- The box-gun presets and toftest now use o2::eventgen::BoxGenerator, which gives weight 1.
- BoxGenerator now looks up the mass for each call; the static cache gave every generator the mass of the first one used.
- The kinematics distributions are unchanged; for a fixed seed the particle list is shifted by one particle.
- BoxGunParam.debug no longer has an effect.
@sawenzel
sawenzel merged commit 0860f6f into AliceO2Group:dev Sep 17, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant